home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / CEIL.C < prev    next >
Text File  |  1991-08-05  |  308b  |  17 lines

  1. /* ceil.c FUNCTION,  FROM P. 202 OF TURBO C BIBLE */
  2. #include<math.h>
  3. #include<stdio.h>
  4. main(int argc, char **argv)
  5. {
  6.     double result;
  7.  
  8.     if(argc < 2)
  9.     {
  10.         printf("Usage: %s <value>\n", argv[0]);
  11.     }
  12.     else
  13.     {
  14.         result = ceil(atof(argv[1]));
  15.         printf("ceil of %s = %f \n", argv[1], result);
  16.     }
  17. }